<template>
  <div class="home">
      <HelloWorld  title ="石河子大学前端实训案例"   @handleMessage="showMessage"     teacher="涛哥"  msg="哈哈哈" > 哈哈哈哈哈哈 ,我是插槽 </HelloWorld>
   
      <h2>Vuex数据</h2>
      {{userinfo}} 
       <h2 v-if="isLogin">
            已经登陆

       </h2>

    

  </div>
</template>

<script>
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'HomeView',
  components:{
    HelloWorld
},
  data(){
      return {
          userinfo:this.$store.state.userinfo,
          isLogin: this.$store.state.isLogin

      }

  },
  methods:{
      showMessage( message){
          alert("我是父亲，我收到儿子的来信："+message);

      }


  }
 
}
</script>
<style lang="less" scoped>
.home {
 // background-image: url(https://ossweb-img.qq.com/upload/webplat/info/yxzj/20220510/1090242164739.jpg);
  height: 100%;
  width: 100%;

}




</style>
